package cn.iocoder.yudao.module.scrm.controller.admin.business.vo.business;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.*;
import static cn.iocoder.yudao.module.scrm.enums.DictTypeConstants.*;
import static cn.iocoder.yudao.module.scrm.enums.DictTypeConstants.SCRM_BUSINESS_SOURCE;

/**
 * @Author LiZhiMin
 * @Date 2024/8/22 11:51
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
public class BusinessImportExcelVO {


    @Schema(description = "商机标题")
    @ExcelProperty("商机标题")
    private String title;


    @Schema(description = "关联客户名称", example = "11697")
    @ExcelProperty("关联客户")
    private String customerIdName;


    @Schema(description = "销售阶段  scrm_sales_stage")
    @ExcelProperty(value = "销售阶段",converter = DictConvert.class)
    @DictFormat(SCRM_SALES_STAGE)
    private String salesStage;

    @Schema(description = "商机类型  scrm_business_type", example = "2")
    @ExcelProperty(value = "商机类型",converter = DictConvert.class)
    @DictFormat(SCRM_BUSINESS_TYPE)
    private String businessType;

    @Schema(description = "成交几率  scrm_transaction_probability")
    @ExcelProperty(value = "成交几率",converter = DictConvert.class)
    @DictFormat(SCRM_TRANSACTION_PROBABILITY)
    private String transactionProbability;


    @Schema(description = "商机来源  scrm_business_source")
    @ExcelProperty(value = "商机来源",converter = DictConvert.class)
    @DictFormat(SCRM_BUSINESS_SOURCE)
    private String businessSource;

    @Schema(description = "归属人员姓名")
    @ExcelProperty("负责人")
    private String vestingOfficerName;







    @Schema(description = "预计销售金额", example = "14637")
    @ExcelProperty("预计销售金额")
    private BigDecimal predictMarketPrice;

    @Schema(description = "预计签单时间")
    @ExcelProperty("预计签单时间")
    @DateTimeFormat(pattern =FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDate predictWrittenTime;

    @Schema(description = "获取日期")
    @ExcelProperty("获取日期")
    @DateTimeFormat(pattern =FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
    private LocalDateTime acquisitionDate;

    @Schema(description = "场次开始时间")
    @ExcelProperty("场次开始时间")
    @DateTimeFormat(pattern =FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDate sessionBeginTime;

    @Schema(description = "场次结束时间")
    @ExcelProperty("场次结束时间")
    @DateTimeFormat(pattern =FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDate sessionEndTime;

    @Schema(description = "签到情况")
//    @ExcelProperty(value = "签到情况",converter = DictConvert.class)
//    @DictFormat(SCRM_SIGN_CONDITION)
    @ExcelProperty( "签到情况")
    private String signCondition;

    @Schema(description = "备注信息", example = "你猜")
    @ExcelProperty("备注信息")
    private String remark;

    @Schema(description = "系统编号")
    //@ExcelProperty("系统编号")
    private String systemNumber;







    @Schema(description = "最后更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "创建者")
    private String creator;

    @Schema(description = "更新者")
    private String updater;

    @Schema(description = "是否删除")
    private Boolean deleted;


    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8176")
    private Integer id;


    @Schema(description = "关联客户id", example = "11697")
    private Integer customerId;

    @Schema(description = "关联订单id", example = "1199")
    private Integer orderId;

    @Schema(description = "主要联系人")
    private String contacts;


    @Schema(description = "归属人员id")
    private String vestingOfficer;


    @Schema(description = "负责人的用户编号", example = "24758")
    private String ownerUserId;

    @Schema(description = "前负责人的用户编号", example = "9662")
    private String oldOwnerUserId;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;



}
